import 'package:flutter/material.dart';

import 'package:get/get.dart';
import 'package:getwidget/components/badge/gf_badge.dart';
import 'package:getwidget/components/badge/gf_button_badge.dart';
import 'package:getwidget/getwidget.dart';
import 'package:getwidget/position/gf_position.dart';
import 'package:getwidget/size/gf_size.dart';

import '../controllers/gfbadge_controller.dart';

class GfbadgeView extends GetView<GfbadgeController> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('徽章'),
        centerTitle: true,
      ),
      body: Container(
        margin: EdgeInsets.all(10),
        child: ListView(
          children: [
            Wrap(
              alignment: WrapAlignment.spaceBetween,
              children: [
                GFButtonBadge(
                  onPressed: () {},
                  text: '11112',
                  size: GFSize.LARGE,
                  icon: GFBadge(
                    child: Text('12'),
                    size: GFSize.MEDIUM,
                    color: GFColors.PRIMARY,
                    shape: GFBadgeShape.pills,
                  ),
                  position: GFPosition.end,
                  type: GFButtonType.outline2x,
                  shape: GFButtonShape.standard,
                ),
                GFButtonBadge(
                  onPressed: () {},
                  text: '11112',
                  size: GFSize.LARGE,
                  icon: GFBadge(
                    child: Text('12'),
                    size: GFSize.MEDIUM,
                    color: GFColors.SUCCESS,
                    shape: GFBadgeShape.pills,
                  ),
                  position: GFPosition.start,
                  type: GFButtonType.outline2x,
                  shape: GFButtonShape.pills,
                  color: GFColors.SUCCESS
                ),

                GFIconBadge(
                  child: GFIconButton(
                  onPressed: (){},
                  icon: Icon(Icons.ac_unit),),
                  counterChild: GFBadge(
                    child: Text("12"),
                    shape: GFBadgeShape.pills,
                  ),
                ),

                GFIconBadge(
                  child: GFIconButton(
                    onPressed: (){},
                    icon: Icon(Icons.ac_unit),
                    size: GFSize.LARGE,
                  ),
                  counterChild: GFBadge(
                    child: Text("12"),
                    size: GFSize.LARGE,
                    color: GFColors.DANGER,
                    shape: GFBadgeShape.pills,
                  ),
                ),

                GFIconBadge(
                  child: GFIconButton(
                    onPressed: (){},
                    icon: Icon(Icons.download_outlined, size: 42),
                    size: GFSize.LARGE,
                    type: GFButtonType.transparent,
                  ),
                  counterChild: GFBadge(
                    child: Text("12"),
                    size: GFSize.LARGE,
                    color: GFColors.SUCCESS,
                    shape: GFBadgeShape.pills,
                  ),
                ),
              ],
            ),

            
          ],
        ),
      ),
    );
  }
}
